import request from '../utils/request';


// 通过大分类查找商品
export const selectGoodsByClassId = data => {
    return request({
        url: '/selectGoodsByClassId',
        method: 'post',
        data
    });
}
// 通过小分类查找商品
export const selectGoodsByCategoryId = data => {
    return request({
        url: '/selectGoodsByCategoryId',
        method: 'post',
        data
    });
};
// 查找全部商品
export const findAllGoods = () => {
    return request({
        url: '/goods/all',
        method: 'post',
    });
};

// 通过搜索框查询商品
export const searchGoods = data => {
    return request({
        url: '/selectGoodsByNameAndPrice',
        method: 'post',
        data
    });
};